<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%=basePath %>/login/scripts/jquery.quickpaginate.js"></script>
<script type="text/javascript">
	$(function(){
		$("#dataTable tbody tr").quickpaginate({ perpage: 10, pager : $("#temp") });
	});
</script>
<style type="text/css">
th{
	color:#375B91;
}
</style>
<div id="content2">
		<div id="box2">
			<div>
				<h3>
					当前位置&nbsp;:&nbsp;灾情数据管理&nbsp;>>&nbsp;历史灾情查询&nbsp;>>&nbsp;气象灾害类型统计表
				</h3>
			</div>
			<div id="search_bar2">
			<form action="sumReportsAction!reports_town.action" method="post">
				<table width="500" border="0" cellpadding="0" cellspacing="3">
					<tr>
						<td width="40">
							类型:
						</td>
						<td width="100">
						  <s:select list="dstypes" listKey="dtName" listValue="dtName" value="report.dstype" name="report.dstype" headerKey="0" headerValue="--所有灾害类型--" theme="simple"></s:select>
						</td>
						
						<td width="40">年份:
					  </td>
						<td width="100">
						<%--<s:select list="#{'2020':'2020','2019':'2019','2018':'2018','2017':'2017',
						'2016':'2016','2015':'2015','2014':'2014','2013':'2013','2012':'2012','2011':'2011',
						'2010':'2010','2009':'2009','2008':'2008','2007':'2007'}" 
						headerKey="0" headerValue="--所有年份--" value="year" name="year" theme="simple"></s:select>--%>
						<select name="year" class="simple">
							<option value="0">--所有年份--</option>
							<c:forEach begin="1983" end="2020" step="1" var="ii">
								<option <c:if test="${year == ii }">selected="selected"</c:if>>${ii}</option>
							</c:forEach>
						</select>
						</td>
						<td width="20">
							月:
						</td>
						<td width="100">
						<s:select list="#{'1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'8','9':'9','10':'10','11':'11','12':'12'}" name="month" value="month" headerKey="0" headerValue="--所有月份--" theme="simple"></s:select>
						</td>
						<td>
							<input type="submit" value="查询" />
					  </td>
					</tr>
				</table>
			</form>
	    </div>
	    <div>${reportTitle }</div>
	    
			<table id="dataTable">
				<thead>
					<tr>
						<th>镇区</th>
						<th>直接经济损失</th>
						<th>受伤人数</th>
						<th>失踪人数</th>
						<th>死亡人数</th>
						<th>受灾总人数</th>
						<th>灾害发生次数</th>
					</tr>
				</thead>
				<tbody>
				<c:forEach items="${reportList}" var="report">
					<tr>
						<td class="a-center">
							${report.town }
						</td>
						<td class="a-center">
							${report.moneyLoss }
						</td>
						<td class="a-center">
							${report.hurt}
						</td>
						<td class="a-center">
							${report.lost}
						</td>
						<td class="a-center">
							${report.dead}
						</td>
						<td class="a-center">
							${report.dstAll}
						</td>
						<td class="a-center">
							${report.actTime}
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
			<div id="temp" style="height: 30px;padding-left:500px;"></div>
			<jsp:include page="flash.jsp"></jsp:include>
			</div>
		<br />
	</div>
